package com.ryan.quartz.temp.strategy;

/**
 * @author Rayn on 2017/10/17.
 * @email liuwei412552703@163.com.
 */
public class MallardDuck extends Duck {

    public MallardDuck() {
        quackBehavior = new Quack();
        flyBehavior = new FlyWithWings();
    }

    @Override
    public void display() {
        System.out.println("这里是 野鸭子。");
    }


    public static void main(String[] args) {
        Duck duck = new MallardDuck();
        duck.performFly();
        duck.performQuack();
        duck.display();
    }
}
